import { createApp } from 'vue';
import './style.scss';
import App from './App.vue';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import { router } from './router';
import hljsVuePlugin from '@highlightjs/vue-plugin'; // 导入组件
import hljs from 'highlight.js/lib/core'; // 导入highlight.js
import 'highlight.js/styles/stackoverflow-light.css';// 导入高亮主题样式
import javascript from 'highlight.js/lib/languages/javascript';
hljs.registerLanguage('javascript', javascript);


const app = createApp(App);
app.use(ElementPlus);
// 全局注册element-plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
app.use(router);
// 全局注册highlightjs组件
app.use(hljsVuePlugin);

app.mount('#app');
